layui.use('form', function(){
    var form = layui.form;

    var $ = layui.jquery;
    //监听提交
    form.on('submit(formAdd)', function(data){
        for(var k in data.field){
            var value=data.field[k];
            if(value==''||null==value){
                layer.msg("请检查数据是否填写完整");
            }
        }
        debugger;
        // layer.msg(JSON.stringify(data.field));
        $.post("/data/add",data.field,function(data,status){
            alert(11);
        });
        return false;
    });
});